import request from '@/utils/request'
export default {
    listByParentId(parentId) {
        return request({
            url: `/admin/core/dict/listByParentId/${parentId}`,
            method: 'get'
        })
    },

    // 增加子类方法
    addCategory(parentId, name) {
        return request({
            url: `/admin/core/dict/addCategory`,
            method: 'post',
            data: {
                parentId,
                name
            }
        })
    },
    
    // 根据id删除子类
    removeById(id) {
        return request({
            url: `/admin/core/dict/remove/${id}`,
            method: 'delete'
        })
    },
}